﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
	Universum
</asp:Content>
<asp:Content ID="scripts" runat="server" ContentPlaceHolderID="ScriptPlaceHolder">
	<% Html.RenderPartial("EditorAndDateUserControl"); %>
</asp:Content>
<asp:Content ID="breadcrumbsContent" ContentPlaceHolderID="Breadcrumbs" runat="server">
	<%= Html.Breadcrumb().Home().End() %>
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"> 
	<div class="span-22">
		<%--<h2>
			Welcome to Universum!</h2>--%>
		<h2 style="text-align:center">
			Universum is a community of teachers and students that wants only to <br /> <strong style="font-size:larger; color:#00AF33">
				Share knowledge</strong>
		</h2>
		<div class="span-11">
			
			<% 
				if (Html.LoggedInUser().Identity.IsAuthenticated == false)
				{
					Html.RenderPartial("../Account/LogOnUC");
				}
				else
				{
					// add some user access like his picture and
					// some statistics
					Html.RenderPartial("../Account/LoggedInUC");
				}
				 %>
		</div>
		<div class="span-11 last">
			<% 
		if(Html.LoggedInUserIsTeacherOrStudent())
				Html.BeginUserLink<BlogsController>(controller => controller.Index()); %>
			<img src="<%= Html.ResolveUrl("~/content/images/blogs.png") %>" style="float: left" />
			<h2>
				Blogs</h2>
			<% if (Html.LoggedInUserIsTeacherOrStudent()) Html.EndLink(); %>
			<p>
				Here you can track what others have to say about things they're passionate about,
				or you too can start sharing.
			</p>
			<p>
				It's easy pick a topic, or two, or three, or .. you get the idea, and write. Write
				down things that you've had a hard time understanding, things that you like, or
				even things you dislike.
			</p>
			<p>
				Share your opinions!
			</p>
		</div>
		<div class="span-11">
			<%if (Html.LoggedInUserIsTeacherOrStudent() || Html.IsSpecialUserLoggedIn()) Html.BeginUserLink<QuestionItController>(c => c.Index(0)); %>
			<img src="<%= Html.ResolveUrl("~/content/images/question.png") %>" style="float: left" />
			<h2>
		<%= Html.IsSpecialUserLoggedIn()?"Offensive questions":"Question IT" %>		</h2>
			<%if (Html.LoggedInUserIsTeacherOrStudent() || Html.IsSpecialUserLoggedIn()) Html.EndLink(); %>
			<p>
				This is a place were, and others like you can begin discussions. It's a place where
				usually you should be able to find answers, and where you can provide answers for
				others.
			</p>
			<p>
				Earn a reputation for yourself, ask good question and give great answers.
			</p>
		</div>
		<div class="span-11 last">
			
			<img src="<%= Html.ResolveUrl("~/content/images/classes.png") %>" style="float: left" />
			<% 
			if (Html.LoggedInUser().IsInRole(Universum.Infrastructure.Security.RoleServiceImpl.RoleType.Student.ToString()))
			{
				Html.BeginUserLink<MyClassesController>(c => c.Index()); %>
			<h2>Your classes</h2>
			<% Html.EndLink();
			} else
				if (Html.LoggedInUser().IsInRole(Universum.Infrastructure.Security.RoleServiceImpl.RoleType.Teacher.ToString()))
				{
			%>
			<% Html.BeginUserLink<ClassesController>(c => c.Index()); %>
			
			<h2>
				Classes</h2>
			<% Html.EndLink();
				}
				else
				{
					%>
					<h2>Materials</h2>
					<%
				}
			%>
			<p>
				Teachers have begun writting their classes online. This is the place where you will
				find their materials, and documentation.
			</p>
			<p>
				You'll also be able to get feedback on the work you've done for a certain lab or
				paper they've asked you to submit.
			</p>
		</div>
	</div>
</asp:Content>
